﻿@model TPT.Models.MArticle

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>MArticle</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.ArticleID)

        <div class="form-group">
            @Html.LabelFor(model => model.CategoryID, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.CategoryID)
                @Html.ValidationMessageFor(model => model.CategoryID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Subject, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Subject)
                @Html.ValidationMessageFor(model => model.Subject)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Summary, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Summary)
                @Html.ValidationMessageFor(model => model.Summary)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Content, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Content)
                @Html.ValidationMessageFor(model => model.Content)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserID, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserID)
                @Html.ValidationMessageFor(model => model.UserID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TimeStart, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.TimeStart)
                @Html.ValidationMessageFor(model => model.TimeStart)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TimeEnd, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.TimeEnd)
                @Html.ValidationMessageFor(model => model.TimeEnd)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.PublicFlag, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.PublicFlag)
                @Html.ValidationMessageFor(model => model.PublicFlag)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Order, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Order)
                @Html.ValidationMessageFor(model => model.Order)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.HighLightFlag, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.HighLightFlag)
                @Html.ValidationMessageFor(model => model.HighLightFlag)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.HighLightOrder, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.HighLightOrder)
                @Html.ValidationMessageFor(model => model.HighLightOrder)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ViewCount, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ViewCount)
                @Html.ValidationMessageFor(model => model.ViewCount)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.DownloadCount, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.DownloadCount)
                @Html.ValidationMessageFor(model => model.DownloadCount)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CommentFlag, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.CommentFlag)
                @Html.ValidationMessageFor(model => model.CommentFlag)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CreateUser, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.CreateUser)
                @Html.ValidationMessageFor(model => model.CreateUser)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UpdateUser, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UpdateUser)
                @Html.ValidationMessageFor(model => model.UpdateUser)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CreateDate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.CreateDate)
                @Html.ValidationMessageFor(model => model.CreateDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UpdateDate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UpdateDate)
                @Html.ValidationMessageFor(model => model.UpdateDate)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
